// 频道相关接口
// 引入配置后的axios
import request from "@/utils/request.js";
// 获取频道列表接口
export const getUserChannel = () => {
  return request({
    url: "/app/v1_0/user/channels",
    method: "GET"
  });
};
// 获取全部频道列表接口
export const allChannels = () => {
  return request({
    method: "GET",
    url: "/app/v1_0/channels"
  });
};

// 删除我的频道的接口
export const delCurChannel = id => {
  return request({
    method: "DELETE",
    url: "/app/v1_0/user/channels",
    data: {
      channels: [id]
    }
  });
};

// 添加我的频道接口
export const addChannel = newChannel => {
  return request({
    method: "PUT",
    url: "/app/v1_0/user/channels",
    data: {
      channels: newChannel
    }
  });
};
